using System.Collections.Generic;
using HarmonyLib;
using UnityEngine;
using System.Reflection;
using System;

namespace hatbox_hack
{
    public class ActorExtras
    {
        public static ActorExtras I;

        // extra fields
        public Dictionary<Actor, int> resistance = new Dictionary<Actor, int>();
        public Dictionary<Actor, ResistanceBar> resistanceBar =
            new Dictionary<Actor, ResistanceBar>();

        public ActorExtras()
        {
            ActorExtras.I = this;
        }

        public void Clear()
        {
            this.resistance.Clear();
            this.resistanceBar.Clear();
        }

        public void AttachResistanceBar(Actor a, ResistanceBar resistanceBar)
        {
            this.resistanceBar[a] = resistanceBar;
        }

        public void DetachResistanceBar(Actor a)
        {
            this.resistanceBar[a] = null;
        }
    }
}
